package perform.criterion;

public class Greatest extends AbstractCriterion {

	private Greatest(StringBuilder builder){
		super(builder);
	}
	
	public static Greatest create(Object one, Object two){
		StringBuilder builder = new StringBuilder();
		builder.append("greatest( ").append(getValue(one)).append(" , ").append(getValue(two)).append(" )");
		return new Greatest(builder);
	}
	
	public Greatest add(Object value){
		builder.replace(builder.indexOf(")"), builder.length(), ", ").append(getValue(value)).append(" )");
		return this;
	}

}
